#include "E:/SVN/axelynx/include/axelynx.h"
#include <windows.h>
#include <iostream>
using namespace axelynx;

int main()
{
    try
    {
        Engine *eng = Engine::Create(EngineDesc());

        WindowDesc wd;
        //wd.mode(WM_FULLSCREEN);

        Window *mw = eng->AddWindow(wd);

        Canvas *c = mw->GetCanvas();

        float y = wd.height_ / 2;

        while(GetAsyncKeyState(VK_ESCAPE)==0 && mw->isEnabled())
        {
            if(GetAsyncKeyState(VK_UP))
            y--;
             if(GetAsyncKeyState(VK_DOWN))
            y++;
            c->Clear();

            c->Color(255,0,0);
            c->Line(100,100,200,y);
            mw->Flip();
            mw->Sync();
        }

       mw->Free();
    }
    catch(AxelynxError &engerr)
    {
        std::cout << engerr.what()<<std::endl;
    }
    return 0;
}
